package net.zhengxinyun.performance.service.indicators;

import net.zhengxinyun.performance.dto.SixTownDTO;
import net.zhengxinyun.performance.entity.SixIndicatorsEntity;
import net.zhengxinyun.performance.entity.SixTownEntity;
import net.zhengxinyun.performance.filter.IndexFilter;
import net.zhengxinyun.performance.filter.SixIndicatorsFilter;
import net.zhengxinyun.performance.filter.TownIndicatorsFilter;

import java.util.List;
import java.util.Map;

/**
 * Created by hyp1202 on 2018/11/27.
 */
public interface SixIndicatorsService {
    String delete (SixIndicatorsEntity sixIndicatorsEntity);

    String update (SixIndicatorsEntity sixIndicatorsEntity,List<SixTownEntity> townList);

    String insert (SixIndicatorsEntity sixIndicatorsEntity, List<SixTownEntity> list);

    String ListInsert(List<SixTownDTO> list);

    /**
     * 查询二级指标
     * @param sixIndicatorsFilter
     * @return
     */
    List<Map<String,Object>> querySec (SixIndicatorsFilter sixIndicatorsFilter);

    /**
     * 查询一级指标及其对应的二级指标
     * @param list
     * @return
     */
    List<Map<String,Object>> queryIndexMap (List<SixIndicatorsFilter> list);

    /**
     * 查询指标
     * @param sixIndicatorsFilter
     * @return
     */
    List<SixIndicatorsFilter> query(SixIndicatorsFilter sixIndicatorsFilter);

    /**
     * 根据查询条件求总数据量
     * @param sixIndicatorsFilter
     * @return
     */
    Integer queryForCount(SixIndicatorsFilter sixIndicatorsFilter);

    /**
     * 设置上级指标id
     * @param sixIndicatorsEntity
     * @return
     */
    SixIndicatorsEntity setSuperId(SixIndicatorsEntity sixIndicatorsEntity);

    List<SixIndicatorsFilter> indexTown(IndexFilter indexFilter);

    List<Map<String,Object>> getIndexMap(List<SixIndicatorsFilter> list);
}
